package com.googlecode.bipol.war.services;

import java.io.Serializable;
import com.googlecode.bipol.war.entity.ISurvey;

/**
 * TODO: Doc
 *
 */
public interface SurveyManager2 extends Serializable
{
    /**
    * Return the survey 'of the day' filled by the user, or a new empty one if no one exists yet
    *
    * @param idlocal Code id for localization
    * @return The survey model
    * @throws ServiceException
    */
    public ISurvey fetchSurvey( String idlocal ) throws ServiceException;

    /**
     * Save a survey filled by a {@link com.googlecode.bip.entity.Role#BIP_USER}
     *
     * @param survey The survey model, as returned by fetchSurvey
     * @return A survey model
     * @throws ServiceException
     */
    public ISurvey postSurvey( ISurvey survey ) throws ServiceException;
}
